/*
 * @Author: xuetao 3168581151@qq.com
 * @Date: 2025-02-14
 * @LastEditors: xuetao 3168581151@qq.com
 * @LastEditTime: 2025-02-14
 * @Description: 加密/解密
 */
// import 'package:encrypt/encrypt.dart' as encrypt;

// class Encrypt {
//   Future<String> encryptPassword(String password, String encryptionKey) async {
//     final key = encrypt.Key.fromUtf8(encryptionKey.padRight(32)); // 密钥需要固定长度
//     final iv = encrypt.IV.fromLength(16); // 生成初始化向量
//     final encrypter = encrypt.Encrypter(encrypt.AES(key));

//     final encrypted = encrypter.encrypt(password, iv: iv);
//     return encrypted.base64; // 返回加密后的密码
//   }
// }
